package com.dikang.keer.product.feign;

import com.dikang.common.to.SkuReductionTo;
import com.dikang.common.to.SpuBoundsTo;
import com.dikang.common.utils.R;
import oracle.jdbc.proxy.annotation.Post;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * ClassName:CouponApplication
 * Package:com.dikang.keer.product.feign
 * Description:
 *
 * @date:2021/11/26 19:04
 * @author:caojunjie
 */

/**
 * 将SPuboundTos转化为json对象
 * 然后去注册中心找需要调用的服务
 * 用http协议想那个服务发送请求
 * 然后对方收到请求后将json重新转化为对象
 */
@FeignClient("keer-coupon")
public interface CouponFeignService {
    @PostMapping("coupon/spubounds/save")
    R saveSpuBounds(@RequestBody SpuBoundsTo spuBoundsTo);

    @PostMapping("coupon/skufullreduction/saveReduction")
    R saveSkuFullReduction(@RequestBody SkuReductionTo skuReductionTo);
}
